package com.gzhryc.net_marketing.cloud.account.dao.db;

import com.gzhryc.jdbc.annotaion.Column;
import com.gzhryc.jdbc.annotaion.Id;
import com.gzhryc.jdbc.annotaion.Table;
import com.gzhryc.jdbc.annotaion.UniqueKey;
import com.gzhryc.shared_device.common.payment.dao.enums.EAppType;

import java.util.Date;

/**
 * 取款用户
 */
@Table(name="cloud_pay_account_withdraw_payee")
public class CloudPayAccountWithdrawPayee {

    @Id(autoIncrement = 100)
    @Column
    protected Long id;

    @UniqueKey(name = "keys")
    @Column(name = "account_id", notNull = true)
    protected Long accountId;

    @UniqueKey(name = "keys")
    @Column(notNull = true, note = "取款人类型，微信或支付宝")
    protected Integer type;

    @UniqueKey(name = "keys")
    @Column(name = "app_id", length = 32, notNull = true)
    protected String appId;

    @UniqueKey(name = "keys")
    @Column(name = "open_id", length = 64, notNull = true)
    protected String openId;

    @Column(name = "face_img", length = 255)
    protected String faceImg;

    @Column(length = 32, notNull = true, note = "用户昵称")
    protected String nickname;

    @Column(length = 32, notNull = true, note = "用户姓名")
    protected String name;

    @Column(length = 16, notNull = true, note = "用户手机号")
    protected String phone;

    @Column(name = "update_date", note = "修改时间", autoUpdateTime = true)
    protected Date updateDate;

    @Column(name = "create_date", note = "创建时间")
    protected Date createDate;

    protected CloudPayAccount account;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getAccountId() {
        return accountId;
    }

    public void setAccountId(Long accountId) {
        this.accountId = accountId;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    public String getOpenId() {
        return openId;
    }

    public void setOpenId(String openId) {
        this.openId = openId;
    }

    public String getFaceImg() {
        return faceImg;
    }

    public void setFaceImg(String faceImg) {
        this.faceImg = faceImg;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public CloudPayAccount getAccount() {
        return account;
    }

    public void setAccount(CloudPayAccount account) {
        this.account = account;
    }

    public String getTypeName() {
        return EAppType.note(this.type);
    }
}
